NET GAME NOW HOSTING

This command will return a value of one if the application has just been made the host of the net game, otherwise zero is returned.

  Syntax
Return Integer=NET GAME NOW HOSTING()
  Returns

This command will return a value of one if the application has just been made the host of the net game, otherwise zero is returned

  Description

During a Pier to Pier net game, if the host leaves the net game then host status is migrated to another player in the net game.

  Example Code
rem Network game can change during session
while mouseclick()<>2
cls
print "HANDLE NET GAME (Right Mouse Button To Continue)"
if net game now hosting()=1 then Hosting=1
if Hosting=1 then PRINT "THIS PLAYER IS NOW HOSTING THE GAME"
if net game lost()=1 then LostGame=1
if LostGame=1 then PRINT "THE GAME SESSION WAS LOST"
returnvalue=net player created()
if returnvalue>0 then PlayerIn=returnvalue
if PlayerIn>0 then PRINT "A NEW PLAYER HAS JOINED THE GAME (";PlayerIn; ")"
returnvalue=net player destroyed()
if returnvalue>0 then PlayerOut=returnvalue
if PlayerOut>0 then PRINT "A PLAYER HAS LEFT THE GAME (";PlayerOut; ")"
endwhile
  See also

MULTIPLAYER Commands Menu
Index